#include "ThreadPool.hpp"
#include "Task.hpp"
#include <unistd.h>
#include <memory>
#include <iostream>

int main()
{
    // std::unique_ptr<ThreadPool<Task>> tp(new ThreadPool<Task>);
    // ThreadPool<Task>::getInstance()->run();
    ThreadPool<Task>::getInstance().run();


    int x,y;
    char op;
    while(true)
    {
        std::cout << "请输入第一个数据：";
        std::cin >> x;
        std::cout << "请输入第二个数据：";
        std::cin >> y;
        std::cout << "请输入要进行的运算：";
        std::cin >> op;
        Task t(x, y, op, mymath);
        // ThreadPool<Task>::getInstance()->push(t);
        ThreadPool<Task>::getInstance().push(t);

        sleep(1);
    }
    return 0;
}